import request from '@/utils/request'

/**
 * 登录
 */
export const loginApi = data => {
  return request({
    method: 'post',
    url: '/base/login',
    data
  })
}

/**
 * 获取用户资料
 */
export const getUserInfoApi = () => {
  return request({
    method: 'post',
    url: 'base/getUserProfile'
  })
}

/**
 * 图片上传
 */
export const uploadImgApi = data => {
  return request({
    method: 'post',
    url: `/base/upload?field=user`,
    data
  })
}

